//
//  DetailRightView.swift
//  ShiZhe
//
//  Created by 陈卿伟 on 16/9/14.
//  Copyright © 2016年 陈卿伟. All rights reserved.
//

import UIKit

class DetailRightView: UIView {
    var priceNum:UILabel!
    override init(frame: CGRect) {
        priceNum = UILabel()
        super.init(frame: frame)
        self.createMeatIcon()
        self.createPriceNum()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    //小肉干
    func createMeatIcon(){
        let meatIcon = UIImageView(frame: CGRect(x: 0, y: 13, width: 15, height: 12))
        meatIcon.image = UIImage(named: "meatIcon")
        self.addSubview(meatIcon)
    }
    
    //创建价格
    func createPriceNum(){
        priceNum.frame = CGRect(x: 18, y: 10, width: 70*SCALEW, height: 16)
        priceNum.font = BaseFunc.getCustomFont(13)
        priceNum.textAlignment = .Right
        priceNum.textColor = UIColor.whiteColor()
        priceNum.text = "0 小肉干"
        self.addSubview(priceNum)
    }
}
